package com.share.handler;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;

/**
 * author:caifan
 * date:2019/7/28
 */
@ControllerAdvice(annotations = RestController.class)
public class RestExceptionHandler {

    @ExceptionHandler()
    public ResponseEntity<String> handle(Exception e) {
        return new ResponseEntity<String>(HttpStatus.OK);
    }
}
